function Save_QuocGia_Click()
{
    var txtQuocGiaID= document.getElementById("txtQuocGiaID");
    var txtQTenQG= document.getElementById("txtQTenQG");
    var cboTrangThai= document.getElementById("cboTrangThai");

    Save_QuocGia([{name: 'QuocGiaID', value: '' + txtQuocGiaID.value + ''},{name: 'TenQG', value: '' + txtQTenQG.value + ''},{name: 'TrangThai', value: '' + cboTrangThai.value + ''}]);
}

function Delete_QuocGia_Click(quocgiaid,msg)
{
    var x=confirm(msg);
    if(x==true)
        {
        Delete_QuocGia([{name: 'QuocGiaID', value: '' + quocgiaid + ''}]);
        }
}
function Update_QuocGia_Click(quocgiaid)
{
    Update_QuocGia([{name: 'QuocGiaID', value: '' + quocgiaid + ''}]);
}



function Save_TienTe_Click()
{
    var txtTienTeID= document.getElementById("txtTienTeID");
    var txtTienTe= document.getElementById("txtTienTe");
    var cboTrangThai= document.getElementById("cboTrangThai");

    Save_TienTe([{name: 'TienTeID', value: '' + txtTienTeID.value + ''},{name: 'TienTe', value: '' + txtTienTe.value + ''},{name: 'TrangThai', value: '' + cboTrangThai.value + ''}]);
}

function Delete_TienTe_Click(TienTeID,msg)
{
    var x=confirm(msg);
    if(x==true)
        {
        Delete_TienTe([{name: 'TienTeID', value: '' + TienTeID + ''}]);
        }
}
function Update_TienTe_Click(TienTeID)
{
    Update_TienTe([{name: 'TienTeID', value: '' + TienTeID + ''}]);
}








function TaoMoinganhang()
{
    cmd_New_nganhang();  
}


function New_tuvanchovay_Click()
{
    cmd_New_nganhang();  
}






function getListTinh_nganhang()
{
    var cboQuocGiaID= document.getElementById("cboQuocGiaID");
    cmdGetListTinh([{name: 'QuocGiaID', value: '' + cboQuocGiaID.value + ''}]);  
}


function Save_nganhang_Click()
{
    
    var cboQuocGiaID= document.getElementById("cboQuocGiaID").value;
 
    
    var cboTinhID= document.getElementById("cboTinhID").value;
    var txtTenNH= document.getElementById("txtTenNH").value;
      
    var txtDiaChi= document.getElementById("txtDiaChi").value;
    var txtDienThoai= document.getElementById("txtDienThoai").value;
    var txtEmail= document.getElementById("txtEmail").value;
    
    
    var txtURL= "";//document.getElementById("txtURL");
    var txtGioiThieu= "";//document.getElementById("txtGioiThieu");
     var txtFax= "";//document.getElementById("txtFax");
      var txtCachTrungTamTP= "0";//document.getElementById("txtCachTrungTamTP");
    
    

    Save_nganhang([{name: 'QuocGiaID', value: '' + cboQuocGiaID + ''}
            ,{name: 'TenNH', value: '' + txtTenNH + ''}
            ,{name: 'TinhID', value: '' + cboTinhID + ''}
            ,{name: 'DiaChi', value: '' + txtDiaChi + ''}
            ,{name: 'DienThoai', value: '' + txtDienThoai + ''}
            ,{name: 'Email', value: '' + txtEmail + ''}
            ,{name: 'Url', value: '' + txtURL + ''}
            ,{name: 'Fax', value: '' + txtFax + ''}
            ,{name: 'CachTrungTamTP', value: '' + txtCachTrungTamTP + ''}
            ,{name: 'GioiThieu', value: '' + txtGioiThieu + ''}
        ]);
      
        
}

function Delete_nganhang_Click(nganhangid,msg)
{
    var x=confirm(msg);
    if(x==true)
        {
            Delete_NganHang([{name: 'ID', value: '' + nganhangid + ''}]);
        }
}
function Update_nganhang_Click(nganhangid)
{
   
    Update_NganHang([{name: 'ID', value: '' + nganhangid + ''}]);
}










function New_Tinh_Click()
{
    var cboQuocGiaID= document.getElementById("cboQuocGiaID");

    window.location="/Admin/si/tinh-thanh-pho/" + cboQuocGiaID.value + "/tao-moi.html";
}
function Save_Tinh_Click()
{
    var txtTinhID= document.getElementById("txtTinhID");
    var txtTenTinh= document.getElementById("txtTenTinh");
    var cboTrangThai= document.getElementById("cboTrangThai");
    var txtQuocGiaID= document.getElementById("txtQuocGiaID");

    Save_Tinh([{name: 'TinhID', value: '' + txtTinhID.value + ''},{name: 'TenTinh', value: '' + txtTenTinh.value + ''},{name: 'TrangThai', value: '' + cboTrangThai.value + ''},{name: 'QuocGiaID', value: '' + txtQuocGiaID.value + ''}]);
}

function Delete_Tinh_Click(Tinhid,msg)
{
    var x=confirm(msg);
    if(x==true)
        {
        Delete_Tinh([{name: 'TinhID', value: '' + Tinhid + ''}]);
        }
}
function Update_Tinh_Click(Tinhid)
{
    Update_Tinh([{name: 'TinhID', value: '' + Tinhid + ''}]);
}